import App from "./App";
import React, { Component } from 'react'
import { Route, Switch, withRouter, BrowserRouter } from 'react-router-dom'
import styles from "./App.css"
import Story from "./pages/Story/Story";
import CreateStory from "./pages/Story/CreateStory";
import Comment from "./pages/Story/Comment";
import Mail from "./pages/Mail/Mail";
import Read from "./pages/Mail/Read";
import Info from "./pages/Mail/Info";
import MyMail from "./pages/Mail/MyMail";
import Select from "./pages/Story/Select";
import Success from "./pages/common/Success";
import SelectSmall from "./pages/Story/SelectSmall";
import Detail from "./pages/Story/Detail";
import Confirm from "./pages/common/Confirm";
import My from "./pages/Story/My"
import Question from "./pages/Question/Question";
import Jump from "./pages/Jump";

class Router extends Component {
    constructor(props) {
        super(props)
        this.state = {
        }
    }

    render() {
        return (
            <BrowserRouter>
                <Switch>
                    <div className={styles.background}>
                        <Route exact path="/" component={withRouter(App)} />
                        <Route exact path="/jump" component={withRouter(Jump)} />
                        <Route exact path="/success" component={withRouter(Success)} />
                        <Route exact path="/story" component={withRouter(Story)} />
                        <Route exact path="/story/select" component={withRouter(Select)} />
                        <Route exact path="/story/selectsmall" component={withRouter(SelectSmall)} />
                        <Route exact path="/story/createstory" component={withRouter(CreateStory)} />
                        <Route exact path="/story/detail" component={withRouter(Detail)} />
                        <Route exact path="/story/comment" component={withRouter(Comment)} />
                        <Route exact path="/story/confirm" component={withRouter(Confirm)} />
                        <Route exact path="/story/my" component={withRouter(My)} />
                        <Route exact path="/read" component={withRouter(Read)} />
                        <Route exact path="/mymail" component={withRouter(MyMail)} />
                        <Route exact path="/mail" component={withRouter(Mail)} />
                        <Route exact path="/mail/info" component={withRouter(Info)} />
                        <Route exact path="/question" component={withRouter(Question)} />
                    </div>
                </Switch>
            </BrowserRouter>
        )
    }
}
export default Router